export default ({$axios})=>{
  $axios.onRequest(req=>{
    // doing something...
   
    let arr = Object.keys(req).map(key=>{
      return key
    })
    console.log(arr,'axios');
    'url',
  'method',
  'headers',
  'baseURL',
  'transformRequest',
  'transformResponse',
  'timeout',
  'adapter',
  'xsrfCookieName',
  'xsrfHeaderName',
  'maxContentLength',
  'maxBodyLength',
  'validateStatus'
  })
  // 响应拦截
  $axios.onResponse(res=>{
    // doing something...
    console.log(res)
  })
  // 错误拦截
  $axios.onError(err=>{
  // doing something...
  console.log(err)
  })
};